package com.invengo.module_check.data.repsitory.common.source.impl;

import com.invengo.library_db.GreenDaoManager;
import com.invengo.library_db.entity.module_check.offline.UserBean;
import com.invengo.module_check.data.repsitory.common.source.CommonSource;

import io.reactivex.Observable;
import me.goldze.mvvmhabit.http.BaseBean;
import me.goldze.mvvmhabit.utils.RxUtils;

public class LocalCommonSourceImpl implements CommonSource {
    @Override
    public Observable<BaseBean<UserBean>> checkLogin(String account, String password) {
        return RxUtils.bindLocal(GreenDaoManager.getInstance().queryUserByAccount(account,password),"离线账号密码错误");
    }
}
